<?php

include '../../../configuration.php';

$smarty->template_dir = LOCAL_PATH.'administrator/main/templates/';
$smarty->compile_dir = LOCAL_PATH.'administrator/main/templates_c/';
$smarty->config_dir = LOCAL_PATH.'administrator/main/configs';

$smarty->compile_check = true;
//$smarty->debugging = true;

$result = mysql_query("SELECT * FROM categories");

$cat_title = array();

while ($rows = mysql_fetch_array($result, MYSQL_ASSOC)) {
	$cat_title[] = "<option>".$rows["cat_title"]."</option>";
}
$faculties = array();

$result2 = mysql_query("SELECT * FROM `faculties`");
while($rows2 = mysql_fetch_array($result2,MYSQL_ASSOC)){
	$faculties[] = $rows2["faculty_name"];
}

$smarty->assign('faculties',$faculties);

$smarty->assign('categories',$cat_title);
include '../../check.php';
if ($checking == 1)
	$smarty->display("modify_category.tpl");
else echo "You are not autorised"; exit;
?>